require 'htmlentities'
require 'digest/md5'
require 'fileutils'

ENTITIES = HTMLEntities.new

def if_login
  if session[:nome_site]
    yield
  else
    @acesso_restrito = true
    erb :login
  end
end